package com.example.back.service;

import com.example.back.model.Order;
import com.example.back.model.OrderProduct;
import com.example.back.model.Product;

import java.util.List;

public interface OrderService {
    List<Order> findAllOrder();
    //查找订单
    List<Order> findOrder(String account);
    //查找订单所有商品
    List<OrderProduct> findOrderProduct(int orderID);
    List<OrderProduct> findOrderProductByType(int orderID, String type);
    List<OrderProduct> findOrderProductByName(int orderID, String name);
    OrderProduct findTheProduct(int orderID, int productID);
    //查找订单状态
    int findOrderState(int orderID);
    //提交订单
    String addOrder(String account, String room);
    //找到房间号
    int findOrderID(String account, String room);
    //提交订单商品
    Boolean addProduct(int orderID, int productID, int count, double cost);
    //更新订单费用
    Boolean addCost(int orderID, double cost);
    //查询订单对应商品
    Boolean findProduct(int orderID, int productID);
    //更新订单商品信息
    Boolean updateProduct(int orderID, int productID, int count, double cost);
    //移出订单商品
    Boolean removeProduct(int orderID, int productID);
    List<Order> findOrderByState(int state);
    List<Order> findOrderByAccount(String account);
    List<Order> findOrderByRoom(String room);
    Boolean deleteOrder(int orderID);
    Boolean finishOrder(int orderID);
}
